﻿using System;
using Fadd.Messaging;

namespace Fadd.IO.Consoles
{
    /// <summary>
    /// Command entered in the console
    /// </summary>
    [Serializable]
    public class Command : IMessage
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="Command"/> class.
        /// </summary>
        /// <param name="name">The name.</param>
        /// <param name="arguments">The arguments.</param>
        public Command(string name, params string[] arguments)
        {
            Name = name;
            Arguments = arguments;
        }

        /// <summary>
        /// Gets arguments (everything enter after name split on space)
        /// </summary>
        public string[] Arguments { get; set; }

        /// <summary>
        /// Gets command name
        /// </summary>
        public string Name { get; set; }

    }
}